package ie.dcu.spca.view.bill;

import java.util.List;
import java.util.Map;

import android.os.Bundle;
import ie.dcu.spca.Main;
import ie.dcu.spca.data.BasicDataManager;
import ie.dcu.spca.data.BillDataManager;
import ie.dcu.spca.model.Bean;
import ie.dcu.spca.view.DataList;

public class BillList extends DataList {
    private static BillDataManager billManager;

    @Override
    protected void afterOnCreateInvoke(Bundle savedInstanceState) {
        super.afterOnCreateInvoke(savedInstanceState);
        billManager = Main.dataManager.billDataManager();
    }

    @Override
    protected BasicDataManager getBeanDataManager() {
        return billManager;
    }

    @Override
    protected Class getCRUDDialog() {
        return BillCRUDDialog.class;
    }

    @Override
    protected List<Bean> getDataListForRefreshOnWindowHasFocus() {
        return (List) billManager.get();
    }

    @Override
    protected void setBundleBeforeStartCRUDDialogForUpdate(Bundle bundle,
            Map<String, Object> dataMap) {
    }

}
